package org.janusproject.demos.acl.request;

import java.util.logging.Level;

import org.janusproject.demos.acl.request.agent.ACLProtocolReceiver;
import org.janusproject.demos.acl.request.agent.ACLProtocolSender;
import org.janusproject.kernel.agent.Kernel;
import org.janusproject.kernel.agent.Kernels;
import org.janusproject.kernel.logger.LoggerUtil;

/**
 * DEMO : Request Protocol
 */
public class Launcher {
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		LoggerUtil.setGlobalLevel(Level.ALL);
		LoggerUtil.setShortLogMessageEnable(true);
		
		Kernel k = Kernels.get( false );
		
		ACLProtocolSender sender = new ACLProtocolSender();
		ACLProtocolReceiver receiver = new ACLProtocolReceiver();
		
		k.submitLightAgent(sender, "sender");
		k.submitLightAgent(receiver, "receiver");
		
		k.launchDifferedExecutionAgents();	
		
		Kernels.killAll();
	}	
}
